home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 028a / pc_lib.zip / PC-LIB.BAS < prev    next >
BASIC Source File  |  1984-02-03  |  18KB  |  197 lines

  1. 10 DIM DUPL$(20),PRO$(9),LIBFILE$(10),MUNIQUE(500),NUNIQUE(500),INF$(112):DIM B$(10),A$(14),BIT(15):VERSION$="2.0":DOT$=".":GOTO 20010:! COMPARE TWO LIBRARY FILES
  2. 1000 ' This file downloaded from Quad Cities board on Sept. 7, 1983
  3. 1010 SCREEN 0:LN$="\"+SPACE$(SCWD-2)+"\":DEF FNA(X$)=SCWD/2-LEN(X$)/2:KEY OFF:CHOICE=-1:GOSUB 1510:LOCATE 4,FNA(TITLE$):COLOR 15,0:PRINT TITLE$:COLOR 7,0
  4. 1030 GOSUB 1110:LOCATE 19,1:IF EXPERT THEN PRINT "Expert mode    : Type a number to make your choice                         "
  5. 1038 IF EXPERT<>1 THEN LOCATE 19,1:PRINT"Beginner's mode: Type a number to light up your choice then press enter."
  6. 1040 COLOR 7,0:CM$="":WHILE CM$="":CM$=INKEY$:WEND:IF ASC(CM$)=27 THEN CHOICE=69:RETURN
  7. 1065 CM=ASC(CM$) - ASC("0"):IF CM>=0 AND CM<=NC THEN CHOICE=CM
  8. 1070 IF (CHOICE<>0) THEN GOTO 1099
  9. 1080 EXPERT=1-EXPERT:GOTO 1030
  10. 1099 IF (EXPERT OR CM$=CHR$(13)) AND (CHOICE>=0) THEN RETURN ELSE 1030
  11. 1110 LONGEST=0:FOR I=1 TO NC:IF LEN(PRO$(I))>LONGEST THEN LONGEST=LEN(PRO$(I))
  12. 1120 NEXT I:XP=(SCWD/2-2)-LONGEST/2:LOCATE 6,XP:PRINT "0.                    ";:LOCATE 6,XP+3:IF EXPERT=0 THEN PRINT"Change to expert mode        ";
  13. 1130 IF EXPERT=1 THEN PRINT "Change to beginner's mode"
  14. 1135 FOR I=1 TO NC:LOCATE 6+I,XP:IF CHOICE=I THEN COLOR 31,0 ELSE COLOR 7,0
  15. 1199 PRINT CHR$(48+I);". ";PRO$(I):NEXT I:COLOR 7,0:RETURN:IF N<=0 OR N>1000 THEN N=5
  16. 1415 NN=N*10:SOUND 32700,NN:SOUND 32700,2:RETURN
  17. 1510 CLS:IF QUIET THEN RETURN ELSE COLOR 0,7:PRINT
  18. 1515 LOCATE 1,1:PRINT "  "+PROGNAME$;TAB(SCWD-15);"Date:";DATE$:LOCATE 2,1:PRINT"Store library file on drive ";DRLIB$;"     Read disks in drive ";DRCAT$:LOCATE 2,SCWD-15:PRINT"Time:  ";TIME$:PRINT:COLOR 7,0:RETURN
  19. 1900 '
  20. 1910 LOCATE 22,15:PRINT"Press any key to continue":V$=INKEY$:IF V$="" THEN GOTO 1910
  21. 1999 RETURN
  22. 2010 ER=ERR:EL=ERL:IF(ERR<>52) AND (ERR<>64) THEN 2012 ELSE LOCATE 24,1:PRINT"Invalid file name";:FOR I=1 TO 2000:NEXT I:LOCATE 24,1:PRINT SPACE$(80):RESUME
  23. 2012 IF(ERR<>58 AND ERL<>19010) THEN 2013 ELSE RESUME 19011
  24. 2013 IF(ERR<>53 AND ERL<>19010) THEN 2015 ELSE RESUME 19012
  25. 2015 IF ERR<>53 THEN 2020 ELSE LOCATE 24,1:PRINT"Do you have the right disk in the drive and the correct file name?";:FOR I=1 TO 2000:NEXT I:LOCATE 24,1:PRINT SPACE$(80):RESUME
  26. 2020 IF ERR<>61 THEN 2025 ELSE LOCATE 23,1:PRINT"The disk appears to be full."
  27. 2021 IF EL=5240 THEN PRINT"Please insert a non-full disk in the drive and press ENTER":INPUT AA$:CLS:RESUME 5210
  28. 2022 PRINT"You should start cataloging from the beginning on a fresh diskette":FOR I=1 TO 1000:NEXT I:END
  29. 2025 IF ERR<>70 THEN 2030 ELSE LOCATE 24,1:PRINT"The disk is write-protected. Please insert the correct diskette.":FOR I=1 TO 2000:NEXT I:LOCATE 24,1:PRINT SPACE$(80):RESUME
  30. 2030 IF ERR<>71 THEN 2040 ELSE LOCATE 22,1:PRINT"Check the drives to be sure the door is closed and a diskette is inside.":PRINT"Press ENTER to continue.";:INPUT AA$:LOCATE 22,1:PRINT SPACE$(75):PRINT SPACE$(75)
  31. 2031 IF EL=5220 THEN RESUME 5220 ELSE RESUME 6530
  32. 2040 PRINT"ERR=";ERR;" ERL=";EL:END:RETURN
  33. 2310 CLS:LOCATE 2,40:PRINT"PC-LIB":LOCATE 4,25:PRINT"Copyright(c) 1983 by John Dannenfeldt":LOCATE 5,39:PRINT"Version ";VERSION$
  34. 2325 LOCATE 10,15:PRINT"If you are using this program and find it to be of value,":LOCATE 11,15:PRINT"suggestions would be appreciated.":LOCATE 14,35:PRINT"John C. Dannenfeldt":LOCATE 15,35:PRINT"1240 10th Street":LOCATE 16,35:PRINT"Silvis, IL 61282"
  35. 2345 LOCATE 21,15:PRINT"You are encouraged to copy and share this program with others.":LOCATE 18,15:PRINT"The latest version will always be available on the QCPC BBS":LOCATE 19,15:PRINT"at 1-319-332-7648 or 1-309-796-2214":GOSUB 19010:GOSUB 1900:RETURN
  36. 5010 FI$=DRLIB$+":"+"***.dta":SCREEN,,0,0:GOSUB 1510:PRINT" Current library files are:":SCR$="":I=1:LOCATE 6,1:FILES FI$:GOSUB 1910:RETURN
  37. 5210 C$=CHR$(13)+CHR$(10):S1$="NAME"+C$+" 8 "+C$+"EXT"+C$+" 3 "+C$+"MO#"+C$+" 2 "+C$+"DA#"+C$+" 2 ":S2$=C$+"YEAR#"+C$+" 4 "+C$+"SIZE#"+C$+" 6 "+C$+"REQ"+C$+" 6 "+C$+"DOSV#"+C$+" 1 "+C$+"FN#"+C$+" 2 "+C$
  38. 5218 S3$="DESCRIPTION"+C$+" 21 "+C$+"VOL"+C$+" 6 "+C$+CHR$(26)+STRING$(38,0):S$=S1$+S2$+S3$
  39. 5220 OPEN LFD$+".HDR" FOR OUTPUT AS #1:PRINT #1,S$:CLOSE:RETURN
  40. 6110 OP=0:R%=1:GOSUB 1510:LOCATE 4,1:PRINT SPACE$(30)+"CREATE NEW LIBRARY FILE":PRINT:PRINT"You will be asked to insert each disk once for cataloging.":PRINT"Please be sure to only catalog the disks you want in this library file!"
  41. 6130 LOCATE 10,5:INPUT"What name would you like to give this library file";LFD$:IF LEN(LFD$)>8 OR LEN(LFD$)<1 OR LFD$="" THEN GOTO 6130
  42. 6135 FIDTA$=DRLIB$+":"+LFD$+".DTA":FL=0:GOSUB 5210:LOCATE 12,5
  43. 6145 IF FL=0 THEN PRINT"Would you like to start cataloging your disks";:ELSE GOSUB 1510:PRINT"Would you like to catalog another disk? (Y/N)";:
  44. 6150 INPUT I$:IF ((I$="y") OR (I$="Y")) THEN GOTO 6170
  45. 6160 IF ((I$="n") OR (I$="N")) THEN 6195
  46. 6165 GOTO 6145
  47. 6170 FL=1:LOCATE 16,5:PRINT "Insert disk in drive ";DRCAT$;" and press return";:INPUT I$:GOSUB 6310:GOTO 6145
  48. 6195 GOSUB 6710:RETURN
  49. 6310 SCREEN 0:KEY OFF:IF DRCAT$="A" THEN DISK%=1 ELSE DISK%=2
  50. 6320 DEF SEG=&H2100:INIT%=2:GETNEXT%=5:FILENAME$="???????????":CALL INIT%(DISK%,FILENAME$):N=1
  51. 6335 FILENAME$=SPACE$(14):CALL GETNEXT%(FILENAME$,STATUS%):IF ((STATUS%<=0) AND (FILENAME$=SPACE$(14))) THEN GOTO 6390
  52. 6341 B%=PEEK(0)+PEEK(1)*256:FDATE=PEEK(B%+26)*256+PEEK(B%+25):FTIME=PEEK(B%+24)*256+PEEK(B%+23):FSIZE$=STR$(32768!*PEEK(B%+31)+256*PEEK(B%+30)+PEEK(B%+29))
  53. 6345 BIT(0)=(FDATE AND 1)/1:BIT(1)=(FDATE AND 2)/2:BIT(2)=(FDATE AND 4)/4:BIT(3)=(FDATE AND 8)/8:BIT(4)=(FDATE AND 16)/16:BIT(5)=(FDATE AND 32)/32:BIT(6)=(FDATE AND 64)/64:BIT(7)=(FDATE AND 128)/128:BIT(8)=(FDATE AND 256)/256
  54. 6346 BIT(9)=(FDATE AND 512)/512:BIT(10)=(FDATE AND 1024)/1024:BIT(11)=(FDATE AND 2048)/2048:BIT(12)=(FDATE AND 4096)/4096:BIT(13)=(FDATE AND 8192)/8192:BIT(14)=(FDATE AND 16384)/16384:BIT(15)=0:DAY$=STR$(BIT(0)+2*BIT(1)+4*BIT(2)+8*BIT(3)+16*BIT(4))
  55. 6348 DAY$=RIGHT$(DAY$,2):MONTH$=STR$(BIT(5)+2*BIT(6)+4*BIT(7)+8*BIT(8)):MONTH$=RIGHT$(MONTH$,2):YRS$=STR$(BIT(9)+2*BIT(10)+4*BIT(11)+8*BIT(12)+16*BIT(13)+32*BIT(14)+64*BIT(15)+1980):YEAR$=RIGHT$(YRS$,4)
  56. 6354 IF STATUS%=8 THEN VOL$=MID$(FILENAME$,3,6):GOTO 6335
  57. 6355 NME$=RIGHT$(FILENAME$,LEN(FILENAME$)-2):LOCA=INSTR(NME$,DOT$):EXT$=MID$(NME$,LOCA+1,3):NME$=LEFT$(NME$,LOCA-1):GOSUB 6610:IF DU=1 THEN GOTO 6335
  58. 6370 SIZE$=STR$(VAL(FSIZE$)):LOCATE 19,1:PRINT NME$;EXT$;DAY$;MONTH$;YEAR$;SIZE$:INF$(N)=NME$+SPACE$(8-LEN(NME$))+EXT$+SPACE$(3-LEN(EXT$))+MONTH$+SPACE$(2-LEN(MONTH$))+DAY$+SPACE$(2-LEN(DAY$))+YEAR$+SPACE$(4-LEN(YEAR$))+SIZE$+SPACE$(6-LEN(SIZE$)):N=N+1
  59. 6385 GOTO 6335
  60. 6390 CLOSE:FP$=FIDTA$:PRINT"Is   ";VOL$;"   the correct volume name for this disk";:INPUT;ANS$:IF((LEFT$(ANS$,1)="Y") OR (LEFT$(ANS$,1)="y")) THEN GOTO 6395
  61. 6393 PRINT:INPUT"Type in a volume name- 6 characters please";VOL$:IF VOL$="" THEN GOTO 6393
  62. 6395 FOR I=1 TO N-1:I$=INF$(I)+SPACE$(30)+VOL$+CHR$(13):GOSUB 6510:R%=R%+1:NEXT I:CLOSE:O2=0:RETURN
  63. 6510 IF O2=1 THEN GOTO 6520
  64. 6515 OPEN FP$ AS #2 LEN=62:O2=1
  65. 6520 FIELD #2,62 AS DT$:LSET DT$=I$:PUT #2,R%:RETURN
  66. 6610 DU=0:STRI$=NME$+"."+EXT$:FOR Q=1 TO ND:IF (LEFT$(STRI$,LEN(DUPL$(Q)))=DUPL$(Q)) THEN DU=1
  67. 6629 NEXT Q:RETURN
  68. 6710 CLOSE:OPEN FIDTA$ AS #1 LEN=62:FIELD #1,1 AS F$,59 AS D$:FA$=CHR$(92):DA$=SPACE$(61):LSET F$=FA$:LSET D$=DA$:PUT #1,R%:CLOSE:RETURN
  69. 6810 GOSUB 1510:LOCATE 5,1:PRINT"Since some files like IBMDOS.COM are on many or most disks,":PRINT"we allow you to define 20 file names that you don't really care to catalog.":ND=6:PRINT"The current duplicate file names are:"
  70. 6820 FOR Q=1 TO 10:LOCATE 8+Q,10:PRINT DUPL$(Q) TAB(30) DUPL$(Q+10):NEXT Q:PRINT"Would you like to add to the list";:INPUT AN$:IF LEFT$(AN$,1)="Y" OR LEFT$(AN$,1)="y" THEN GOTO 6835
  71. 6831 RETURN
  72. 6835 LOCATE 20,10:INPUT"Additional file name";DUPL$(ND+1):LOCATE 21,10:INPUT"More additions?";AN$:ND=ND+1:IF AN$="y" OR AN$="Y" THEN 6845 ELSE GOTO 6899
  73. 6845 LOCATE 19,10:PRINT SPACE$(40):PRINT SPACE$(40):PRINT SPACE$(40):LOCATE 20,10:GOTO 6820
  74. 6899 RETURN
  75. 6910 GOSUB 1510:OLIB$=DRLIB$:OCAT$=DRCAT$:INPUT "Do you want to change the drive functions noted above";AN$:IF LEFT$(AN$,1)="Y" OR LEFT$(AN$,1)="y" THEN 6925 ELSE RETURN
  76. 6925 PRINT:INPUT"Store library file on drive ";DRLIB$:IF DRLIB$="" THEN 6925
  77. 6930 PRINT:INPUT"Read disks in drive ";DRCAT$:IF DRCAT$="" THEN 6930
  78. 6935 IF DRLIB$=DRCAT$ THEN PRINT "You can't do both in one drive! Try again!":GOTO 6955 ELSE 6936
  79. 6936 UPLIB$=CHR$(ASC(DRLIB$)-32):UPCAT$=CHR$(ASC(DRCAT$)-32):IF (ASC(DRLIB$)>96) THEN DRLIB$=UPLIB$
  80. 6939 IF (ASC(DRCAT$)>96) THEN DRCAT$=UPCAT$
  81. 6950 IF((LEN(DRLIB$)<>1) OR(LEN(DRCAT$)<>1)) THEN 6955
  82. 6951 LIBA=ASC(DRLIB$):CATA=ASC(DRCAT$):IF((LIBA<65) OR (CATA<65)) THEN LOCATE 22,1:PRINT"Please use rational drive letters only!!":GOTO 6955
  83. 6954 RETURN
  84. 6955 GOSUB 1910:LOCATE 22,1:PRINT SPACE$(80):DRLIB$=OLIB$:DRCAT$=OCAT$:GOTO 6910
  85. 7010 GOSUB 1510
  86. 7015 PRINT"PURPOSE--":PRINT"This program allows you to create a diskfile of all your programs":PRINT"by reading the directory off each disk you catalog, assigning a volume name":PRINT"and writing it to a file that may be manipulated by PC-FILE-- a"
  87. 7017 PRINT"public domain database program available from Jim Button"
  88. 7019 PRINT:PRINT"DEFAULT FILE NAMES--":PRINT"Since some file names like IBMDOS.COM are on":PRINT"many or most disks, we allow you to define 20 file names":PRINT"that you don't really care to catalog."
  89. 7020 PRINT:PRINT"After you create your library file you must use PC-FILE to sort":PRINT"it before PC-FILE can produce reports on your disk library.":PRINT:PRINT"Remember to start BASIC/S:1024 so there is enough buffer space!!":GOSUB 1910:RETURN
  90. 11010 O1=0:O2=0:O3=0:O4=0:GOTO 11240:GOSUB 1510
  91. 11030 '
  92. 11035 IF O1=1 THEN GOTO 11045
  93. 11040 OPEN FG$ AS #1 LEN=26:O1=1
  94. 11045 IF EOF(1) THEN MDONE=1:GOTO 11055
  95. 11050 FIELD #1,2 AS MINAME$,20 AS REST$,4 AS MD$:GET #1,R%:MD=VAL(MD$)
  96. 11055 RETURN
  97. 11060 '
  98. 11065 IF O2=1 THEN GOTO 11075
  99. 11070 OPEN FG$ AS #2 LEN=26:O2=1
  100. 11075 IF EOF(2) THEN NDONE=1:GOTO 11085
  101. 11080 FIELD #2,2 AS NINAME$,20 AS REST$,4 AS ND$:GET #2,R%:ND=VAL(ND$)
  102. 11085 RETURN
  103. 11090 '
  104. 11095 IF O3=1 THEN GOTO 11105
  105. 11100 OPEN FG$ AS #3 LEN=62:O3=1
  106. 11105 FIELD #3,11 AS MNAME$,51 AS MREST$:GET #3,R%:RETURN
  107. 11110 '
  108. 11115 IF O4=1 THEN GOTO 11125
  109. 11120 OPEN FG$ AS #4 LEN=62:O4=1
  110. 11125 FIELD #4,11 AS NNAME$,51 AS NREST$:GET #4,R%:RETURN
  111. 11150 '
  112. 11155 IF O1=1 THEN GOTO 11165
  113. 11160 OPEN FG$ AS #1 LEN=62:O1=1
  114. 11165 FIELD #1,62 AS DTA$:GET #1,R%:RETURN
  115. 11190 '
  116. 11195 GOSUB 1510:LOCATE 4,1:PRINT"This program will compare any two library files CAT1.DTA and CAT2.DTA":PRINT"created by this version of PC-LIB"
  117. 11200 PRINT:PRINT"It is suggested that you operate this program from electronic disk since":PRINT"it does a great deal of disk reading and writing and will run faster and":PRINT"cause less disk wear on an electronic disk."
  118. 11205 PRINT:PRINT"The disk (electronic or real) should contain these programs:":PRINT"   CAT1.DTA":PRINT"   CAT1.INX":PRINT"   CAT2.DTA":PRINT"   CAT2.INX":PRINT"   BASIC.COM"
  119. 11210 PRINT"   and this program- PC-LIB.BAS":PRINT:PRINT"These programs will take up about 100K of space so a  128K or 196K ":PRINT"electronic disk is suggested to allow adequate room for the resulting files":GOSUB 1910
  120. 11215 GOSUB 1510:PRINT"This program will create on the disk the program runs from two sets of PC-LIB":PRINT"formatted files:":PRINT:PRINT"UNIQUE1.DTA contains all the entries found only in the CAT1.DTA":PRINT"file on comparison."
  121. 11220 PRINT:PRINT"UNIQUE2.DTA contains all the programs found only in CAT2.DTA":PRINT:PRINT"You will need the accompanying header files CAT1.HDR and CAT2.HDR":PRINT"when you use PC-FILE to examine CAT1.DTA and CAT2.DTA":GOSUB 1910
  122. 11225 GOSUB 1510:PRINT"For your convenience, below is a BAT file listing that can be used to load":PRINT"the electronic disk with the necessary programs and start the program":PRINT"Please note the parameters needed when you use BASIC"
  123. 11230 PRINT:PRINT"It assumes that you use CAT1.DTA and CAT2.DTA as the names for your library files":PRINT"and that you use C: as your electronic disk":PRINT
  124. 11235 PRINT"       COPY A:CAT1.* C:":PRINT"       COPY A:CAT2.* C:":PRINT"       COPY A:BASIC.COM C:":PRINT"       COPY A:PC-LIB.BAS C:":PRINT"       BASIC C:COMPARE.BAS/S:1024/F:4":GOSUB 1910:RETURN
  125. 11240 'Setup
  126. 11255 GOSUB 1510:INPUT"Do you need instructions";AA$:IF LEFT$(AA$,1)="Y" OR LEFT$(AA$,1)="y" THEN GOSUB 11190
  127. 11260 CLOSE
  128. 11265 GOSUB 1510:LOCATE 3,1:PRINT"What is the name of the first library file to be compared":INPUT;CAT1$:X=INSTR(CAT1$,"."):IF X<>0 THEN GOTO 11280
  129. 11270 IF LEN(CAT1$)>8 THEN GOTO 11265
  130. 11275 CAT1ROOT$=CAT1$:GOTO 11285
  131. 11280 CAT1ROOT$=LEFT$(CAT1$,X-1)
  132. 11285 CAT1INX$=CAT1ROOT$+".inx":CAT1DTA$=CAT1ROOT$+".dta"
  133. 11290 LOCATE 5,1:PRINT"What is the name of the library file to be compared with ";CAT1DTA$;:INPUT;CAT2$:X=INSTR(CAT2$,"."):IF X<>0 THEN GOTO 11305
  134. 11295 IF LEN(CAT2$)>8 THEN GOTO 11290
  135. 11300 CAT2ROOT$=CAT2$:GOTO 11310
  136. 11305 CAT2ROOT$=LEFT$(CAT2$,X-1)
  137. 11310 CAT2INX$=CAT2ROOT$+".inx":CAT2DTA$=CAT2ROOT$+".dta":PRINT:PRINT"Would you like a file of all programs unique to ";CAT1DTA$;:INPUT;UN1$:PRINT:PRINT"Would you like a file of all programs unique to ";CAT2DTA$;:INPUT;UN2$
  138. 11315 PRINT:PRINT"Would you like to annotate ";CAT2DTA$;" with the descriptions from ";CAT1DTA$;:INPUT;ANNO$:GOSUB 1510:LOCATE 3,1:PRINT"To compare library files they must be sorted correctly first.":PRINT"the correct sort order is:":PRINT"  Name"
  139. 11317 PRINT"Ext":INPUT"Is the new file sorted in this order";ANS$:A$=LEFT$(ANS$,1):IF A$<>"n" OR A$<>"N" THEN GOTO 11330
  140. 11325 PRINT"Sort ";NEWROOT$;" correctly using PC-FILE and then run this program again":END
  141. 11330 PRINT"Preparing files....":LFD$="unique1":GOSUB 5210:LFD$="unique2":GOSUB 5210:M=1:N=1:MU=1:NU=1:PRINT"Comparing files...."
  142. 11335 R%=M:FG$=CAT1INX$:GOSUB 11030:R%=N:FG$=CAT2INX$:GOSUB 11060:IF MDONE AND NDONE THEN GOTO 11410
  143. 11340 IF MDONE THEN GOTO 11400
  144. 11345 IF NDONE THEN GOTO 11390
  145. 11350 IF(NINAME$>MINAME$) THEN GOTO 11390
  146. 11355 IF(MINAME$>NINAME$) THEN GOTO 11400
  147. 11360 IF LEFT$(MINAME$,1)="\" AND LEFT$(NINAME$,1)="\" THEN GOTO 11410
  148. 11365 R%=MD:FG$=CAT1DTA$:GOSUB 11090:R%=ND:FG$=CAT2DTA$:GOSUB 11110:LOCATE 18,1:PRINT MNAME$,NNAME$:IF(NNAME$>MNAME$) THEN GOTO 11390
  149. 11370 IF(MNAME$>NNAME$) THEN GOTO 11400
  150. 11375 IF ((ANNO$<>"Y") AND (ANNO$<>"y")) THEN GOTO 11385
  151. 11380 INFO$=MID$(MREST$,15,30):DN$=MID$(NREST$,1,14):DE$=MID$(NREST$,45,7):NE$=NNAME$+DN$+INFO$+DE$:PRINT NE$:FP$=CAT2DTA$:R%=ND:I$=NE$:CLOSE #2:O2=0:GOSUB 6510:CLOSE #2:O2=0
  152. 11385 M=M+1:N=N+1:GOTO 11335
  153. 11390 'master unique
  154. 11395 MUNIQUE(MU)=MD:MU=MU+1:M=M+1:GOTO 11335
  155. 11400 'new unique
  156. 11405 NUNIQUE(NU)=ND:NU=NU+1:N=N+1:GOTO 11335
  157. 11410 'create unique files
  158. 11415 CLOSE:O1=0:O2=0:O3=0:O4=0:IF ((UN1$<>"Y") AND (UN1$<>"y")) THEN GOTO 11425
  159. 11420 FG$=CAT1DTA$:FP$="unique1.dta":CLS:PRINT"Programs unique to ";CAT1DTA$:FOR N=1 TO MU-1:R%=MUNIQUE(N):GOSUB 11150:I$=DTA$:PRINT"M UNIQUE(";N;")= ";DTA$:R%=N:GOSUB 6510:NEXT N:R%=MU:I$="\"+SPACE$(61):GOSUB 6510:CLOSE:O1=0:O2=0
  160. 11425 ' create nunique
  161. 11427 GOSUB 1910:IF ((UN2$<>"Y") AND (UN2$<>"y")) THEN GOTO 11440
  162. 11435 FG$=CAT2DTA$:FP$="unique2.dta":CLS:PRINT"Programs unique to ";CAT2DTA$:FOR N=1 TO NU-1:R%=NUNIQUE(N):GOSUB 11150:I$=DTA$:PRINT"N UNIQUE(";N;")= ";DTA$:R%=N:GOSUB 6510:NEXT N:R%=NU:I$="\"+SPACE$(61):GOSUB 6510
  163. 11440 GOSUB 1910:CLOSE:RETURN
  164. 19010 NAME "FATREAD.BIN" AS "FATREAD.BIN"
  165. 19011 DEF SEG=&H2100:BLOAD"FATREAD.BIN",0:RETURN
  166. 19012 OPEN "R",#1,"FATREAD.BIN",1:FIELD #1,1 AS N$:READ N:LL=(N/28)+1:FOR I=1 TO N:READ X$,CHECK:FOR C=1 TO LEN(X$) STEP 2:CC$="&H"+MID$(X$,C,2):IF CHECK=9999 THEN 19024
  167. 19020 LSET N$=CHR$(VAL(CC$)):PUT #1:CHECK=CHECK-VAL(CC$):NEXT C:IF CHECK<>0 THEN 19052
  168. 19022 NEXT I:CLOSE
  169. 19024 GOTO 19056
  170. 19026 DATA  292
  171. 19028 DATA FD001700001C012401EB3590EB6490FF00000000003F000000000000,1571
  172. 19030 DATA 00000000000000000000000000000000000000000000000000000000,0
  173. 19032 DATA 0000000000000000558BEC1E8CC88ED833F6268B5E06268B5F01268A,2211
  174. 19034 DATA 00888410004683FE0B7CF38B7608268B04A20F0032C0A238001F5DCA,2526
  175. 19036 DATA 0400558BEC1E8CC88ED8FA892636008C1634008ED0BCCC01FBBA1D01,3095
  176. 19038 DATA B41ACD21BA0800803E3800007508FE063800B411EB02B412CD213C00,2255
  177. 19040 DATA 7560268B5E0826803F0E7551268B5F0133FF8BF78BCFB06002062401,2561
  178. 19042 DATA 2688014726C6013A478A8425013C20740626880147EB0C80F9007507,2128
  179. 19044 DATA FEC126C6012E474683FE08750C80F9007507FEC126C6012E4783FE0B,3091
  180. 19046 DATA 7CCFA0300132E4EB03B8FFFFEB03B8FEFF268B5E06268907FA8E1634,3606
  181. 19048 DATA 008B263600FB1F5DCA04001A,838
  182. 19050 DATA 000000,9999
  183. 19052 PRINT "* * ERROR VERIFY FOLLOWING DATA * * * ":PRINT X$;",";CHECK
  184. 19056 CLOSE:DEF SEG=&H2100:BLOAD"FATREAD.BIN",0:RETURN
  185. 20010 DUPL$(1)="BASIC.COM":DUPL$(2)="BASICA.COM":DUPL$(3)="COMMAND.COM":DUPL$(4)="IBMBIO.COM":DUPL$(5)="IBMDOS.COM":DUPL$(6)="SD.COM":ND=6:FAT=0:DRLIB$="B":DRCAT$="A":DEF SEG=0:POKE &H417,PEEK(&H417) OR &H40:ON ERROR GOTO 2010:SCREEN 0:KEY OFF
  186. 21017 GOSUB 2310:SCWD=80:PROGNAME$="         PC-LIB   Multidisk Librarian":EXPERT=0:NC=7:TITLE$="Main Menu":PRO$(1)="Create new library file":PRO$(2)="Display current library files":PRO$(3)="Redefine duplicate file list":PRO$(4)="Change default drives"
  187. 21050 PRO$(5)="Leave this program":PRO$(6)="Program instructions":PRO$(7)="Compare two library files and annotate"
  188. 21055 GOSUB 1010:IF CHOICE=1 THEN GOSUB 6110
  189. 21065 IF CHOICE=2 THEN GOSUB 5010
  190. 21070 IF CHOICE=3 THEN GOSUB 6810
  191. 21075 IF CHOICE=4 THEN GOSUB 6910
  192. 21080 IF CHOICE=5 THEN 30000
  193. 21083 IF CHOICE=6 THEN GOSUB 7010
  194. 21084 IF CHOICE=7 THEN GOSUB 11010
  195. 21085 GOTO 21055
  196. 30000 CLS:GOSUB 1510:LOCATE 10,1:PRINT"Remember to sort your new disk library file:";LFNA$:LOCATE 11,1:PRINT"before using any other PC-File features":GOSUB 1910:END
  197.